##=============================================================================
##
##  Copyright (c) Kitware, Inc.
##  All rights reserved.
##  See LICENSE.txt for details.
##
##  This software is distributed WITHOUT ANY WARRANTY; without even
##  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
##  PURPOSE.  See the above copyright notice for more information.
##
##  Copyright 2015 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
##  Copyright 2015 UT-Battelle, LLC.
##  Copyright 2015 Los Alamos National Security.
##
##  Under the terms of Contract DE-NA0003525 with NTESS,
##  the U.S. Government retains certain rights in this software.
##  Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
##  Laboratory (LANL), the U.S. Government retains certain rights in
##  this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.12...3.15 FATAL_ERROR)
project(performance CXX)

#Find the VTK-m package
find_package(VTKm REQUIRED QUIET)

set(target performance)

set(headers )                         
set(template_sources
  )
set(sources
parameter/Parameter.cpp
parameter/CommandLine.cpp
  )

set(device_sources
core/performance.cpp 
  )

add_library( ${target} 
${sources} ${template_sources} ${headers} ${device_sources}
             "parameter/CommandLine.cpp" "parameter/CommandLine.h")

vtkm_add_target_information(${target}
                            DROP_UNUSED_SYMBOLS MODIFY_CUDA_FLAGS
                            DEVICE_SOURCES ${device_sources})

add_library(_compiler_flags INTERFACE)
target_compile_features(_compiler_flags INTERFACE cxx_std_11)

target_include_directories(_compiler_flags INTERFACE
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
  $<INSTALL_INTERFACE:${_INSTALL_INCLUDE_DIR}>
  )


target_link_libraries(${target} PUBLIC vtkm_cont vtkm_worklet vtkm_io)
target_link_libraries(${target} PUBLIC _compiler_flags  )



#add_subdirectory(hello)
add_subdirectory(example)
add_subdirectory(contrib/getpot)


